package com.ruoyi.bole.integral.service.impl;

import java.util.List;

import com.ruoyi.bole.integral.mapper.BoleIntegralSeasonMapper;
import com.ruoyi.bole.integral.service.IBoleIntegralSeasonService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.bole.integral.domain.BoleIntegralSeason;


/**
 * 积分赛季Service业务层处理
 * 
 * @author wujiale
 * @date 2025-05-29
 */
@Service
public class BoleIntegralSeasonServiceImpl implements IBoleIntegralSeasonService
{
    @Autowired
    private BoleIntegralSeasonMapper boleIntegralSeasonMapper;

    @Override
    public Integer selectMaxSeason() {
        return boleIntegralSeasonMapper.selectMaxSeason();
    }

    /**
     * 查询积分赛季
     * 
     * @param seasonId 积分赛季主键
     * @return 积分赛季
     */
    @Override
    public BoleIntegralSeason selectBoleIntegralSeasonBySeasonId(Long seasonId)
    {
        return boleIntegralSeasonMapper.selectBoleIntegralSeasonBySeasonId(seasonId);
    }

    /**
     * 查询积分赛季列表
     * 
     * @param boleIntegralSeason 积分赛季
     * @return 积分赛季
     */
    @Override
    public List<BoleIntegralSeason> selectBoleIntegralSeasonList(BoleIntegralSeason boleIntegralSeason)
    {
        return boleIntegralSeasonMapper.selectBoleIntegralSeasonList(boleIntegralSeason);
    }

    /**
     * 新增积分赛季
     * 
     * @param boleIntegralSeason 积分赛季
     * @return 结果
     */
    @Override
    public int insertBoleIntegralSeason(BoleIntegralSeason boleIntegralSeason)
    {
        boleIntegralSeason.setCreateTime(DateUtils.getNowDate());
        return boleIntegralSeasonMapper.insertBoleIntegralSeason(boleIntegralSeason);
    }

    /**
     * 修改积分赛季
     * 
     * @param boleIntegralSeason 积分赛季
     * @return 结果
     */
    @Override
    public int updateBoleIntegralSeason(BoleIntegralSeason boleIntegralSeason)
    {
        return boleIntegralSeasonMapper.updateBoleIntegralSeason(boleIntegralSeason);
    }

    /**
     * 批量删除积分赛季
     * 
     * @param seasonIds 需要删除的积分赛季主键
     * @return 结果
     */
    @Override
    public int deleteBoleIntegralSeasonBySeasonIds(Long[] seasonIds)
    {
        return boleIntegralSeasonMapper.deleteBoleIntegralSeasonBySeasonIds(seasonIds);
    }

    /**
     * 删除积分赛季信息
     * 
     * @param seasonId 积分赛季主键
     * @return 结果
     */
    @Override
    public int deleteBoleIntegralSeasonBySeasonId(Long seasonId)
    {
        return boleIntegralSeasonMapper.deleteBoleIntegralSeasonBySeasonId(seasonId);
    }
}
